﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Financeiro.Model
{
    public class ImpostosServico
    {

        #region Constants

        private const double COFINS = 0.03;
        private const double PIS = 0.0065;
        private const double INSS = 0.0288;
        private const double IR = 0.0480;
        private const double ISS = 0.02;

        #endregion

        #region Fields

        private double baseCalculo;
        
        #endregion

        #region Properties

        public double BaseCalculo
        {
            get { return baseCalculo; }
            set { baseCalculo = value; }
        }

        #endregion

        #region Constructors()
        public ImpostosServico()
        {}

        public ImpostosServico(double baseCalculo)
        {
            this.baseCalculo = baseCalculo;
        }

        #endregion

        #region Methods

        public double totalImposto()
        {
            double impostos = COFINS + PIS + INSS + IR + ISS;

            double valor = Math.Round(BaseCalculo * impostos, 2);

            return valor;

        }

        public double valorCofins()
        {
            return Math.Round(BaseCalculo * COFINS, 2);
        }

        public double valorPIS()
        {
            return Math.Round(BaseCalculo * PIS, 2);
        }

        public double valorINSS()
        {
            return Math.Round(BaseCalculo * INSS, 2);
        }

        public double valorIR()
        {
            return Math.Round(BaseCalculo * IR, 2);
        }

        public double valorISS()
        {
            return Math.Round(BaseCalculo * ISS, 2);
        }

        #endregion

    }
}
